<template>
  <el-dialog
      title="设置打招呼上限"
      :visible.sync="visible"
      width="30%"
      :before-close="onClose">
      <div class="set-talke-content">
        企微每日打招呼上限：
        <el-input size="small" v-model="value" style="width: 80px;"/>
        <span style="margin: 0 4px;">次</span>
        <el-button size="small" @click="setDefaultValue()">设为推荐值</el-button>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="onClose">取消</el-button>
        <el-button type="primary" @click="onClose">保存</el-button>
      </span>
    </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      value: null
    }
  },
  props: ['visible'],
  methods: {
    setDefaultValue() {
      this.value = 50
    },
    onClose() {
      this.$emit('onClose');
    }
  }
}
</script>
<style lang="scss" scoped>
.set-talke-content {
  font-size: 14px;
  line-height: 22px;
  display: flex;
  align-items: center;
}
</style>